/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.lottery.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.lottery.entity.WechatUser;
import com.thinkgem.jeesite.modules.lottery.dao.WechatUserDao;

/**
 * 微信抽奖活动-用户管理模块Service
 *
 * @author 黄茂展
 * @version 2019-07-31
 */
@Service
@Transactional(readOnly = true)
public class WechatUserService extends CrudService<WechatUserDao, WechatUser> {

    @Autowired
    private WechatUserDao wechatUserDao;

    public WechatUser get(String id) {
        return super.get(id);
    }

    public List<WechatUser> findList(WechatUser wechatUser) {
        return super.findList(wechatUser);
    }

    public Page<WechatUser> findPage(Page<WechatUser> page, WechatUser wechatUser) {
        return super.findPage(page, wechatUser);
    }

    public WechatUser findByOpenid(String openid) {
        return wechatUserDao.findByOpenid(openid);
    }

    public List<WechatUser> getUserListOfActivity(String activity) {
        return wechatUserDao.getUserListOfActivity(activity);
    }

    @Transactional(readOnly = false)
    public void save(WechatUser wechatUser) {
        super.save(wechatUser);
    }

    @Transactional(readOnly = false)
    public void delete(WechatUser wechatUser) {
        super.delete(wechatUser);
    }

}